#include "Bullet3Collision/BroadPhaseCollision/b3DynamicBvhBroadphase.h"
#ifdef __cplusplus
extern "C" {
#endif
b3DynamicBvhBroadphase* bullet_Newb3DynamicBvhBroadphase(int proxyCapacity,b3OverlappingPairCache* paircache){
	int c_arg_proxyCapacity=proxyCapacity;
	b3OverlappingPairCache * c_arg_paircache=(b3OverlappingPairCache *)(void*)(paircache);
	b3DynamicBvhBroadphase* wrap_out = new b3DynamicBvhBroadphase(c_arg_proxyCapacity,c_arg_paircache);
	return wrap_out;
}

void bullet_b3DynamicBvhBroadphase_collide(b3DynamicBvhBroadphase* c_this,b3Dispatcher* dispatcher){
	b3Dispatcher * c_arg_dispatcher=(b3Dispatcher *)(void*)(dispatcher);
	c_this->collide(c_arg_dispatcher);
}

b3BroadphaseProxy* bullet_b3DynamicBvhBroadphase_createProxy(b3DynamicBvhBroadphase* c_this,b3Vector3* aabbMin,b3Vector3* aabbMax,int objectIndex,void* userPtr,int collisionFilterGroup,int collisionFilterMask){
	b3Vector3 const& c_arg_aabbMin=(b3Vector3 const&)(*aabbMin);
	b3Vector3 const& c_arg_aabbMax=(b3Vector3 const&)(*aabbMax);
	int c_arg_objectIndex=objectIndex;
	void * c_arg_userPtr=(void *)(void*)(userPtr);
	int c_arg_collisionFilterGroup=collisionFilterGroup;
	int c_arg_collisionFilterMask=collisionFilterMask;
	b3BroadphaseProxy * c_out = c_this->createProxy(c_arg_aabbMin,c_arg_aabbMax,c_arg_objectIndex,c_arg_userPtr,c_arg_collisionFilterGroup,c_arg_collisionFilterMask);
	b3BroadphaseProxy* wrap_out = (b3BroadphaseProxy*)(void*)(c_out);
	return wrap_out;
}

int bullet_b3DynamicBvhBroadphase_GetFieldOfM_cid(b3DynamicBvhBroadphase* c_this){
	return (int)(c_this->m_cid);
}

int bullet_b3DynamicBvhBroadphase_GetFieldOfM_cupdates(b3DynamicBvhBroadphase* c_this){
	return (int)(c_this->m_cupdates);
}

bool bullet_b3DynamicBvhBroadphase_GetFieldOfM_deferedcollide(b3DynamicBvhBroadphase* c_this){
	return (bool)(c_this->m_deferedcollide);
}

int bullet_b3DynamicBvhBroadphase_GetFieldOfM_dupdates(b3DynamicBvhBroadphase* c_this){
	return (int)(c_this->m_dupdates);
}

int bullet_b3DynamicBvhBroadphase_GetFieldOfM_fixedleft(b3DynamicBvhBroadphase* c_this){
	return (int)(c_this->m_fixedleft);
}

int bullet_b3DynamicBvhBroadphase_GetFieldOfM_fupdates(b3DynamicBvhBroadphase* c_this){
	return (int)(c_this->m_fupdates);
}

bool bullet_b3DynamicBvhBroadphase_GetFieldOfM_needcleanup(b3DynamicBvhBroadphase* c_this){
	return (bool)(c_this->m_needcleanup);
}

int bullet_b3DynamicBvhBroadphase_GetFieldOfM_newpairs(b3DynamicBvhBroadphase* c_this){
	return (int)(c_this->m_newpairs);
}

int bullet_b3DynamicBvhBroadphase_GetFieldOfM_pid(b3DynamicBvhBroadphase* c_this){
	return (int)(c_this->m_pid);
}

float bullet_b3DynamicBvhBroadphase_GetFieldOfM_prediction(b3DynamicBvhBroadphase* c_this){
	return (float)(c_this->m_prediction);
}

bool bullet_b3DynamicBvhBroadphase_GetFieldOfM_releasepaircache(b3DynamicBvhBroadphase* c_this){
	return (bool)(c_this->m_releasepaircache);
}

b3DynamicBvh** bullet_b3DynamicBvhBroadphase_GetFieldOfM_sets(b3DynamicBvhBroadphase* c_this){
	return (b3DynamicBvh**)(&c_this->m_sets);
}

int bullet_b3DynamicBvhBroadphase_GetFieldOfM_stageCurrent(b3DynamicBvhBroadphase* c_this){
	return (int)(c_this->m_stageCurrent);
}

b3DbvtProxy*** bullet_b3DynamicBvhBroadphase_GetFieldOfM_stageRoots(b3DynamicBvhBroadphase* c_this){
	return (b3DbvtProxy***)(&c_this->m_stageRoots);
}

unsigned int bullet_b3DynamicBvhBroadphase_GetFieldOfM_updates_call(b3DynamicBvhBroadphase* c_this){
	return (unsigned int)(c_this->m_updates_call);
}

unsigned int bullet_b3DynamicBvhBroadphase_GetFieldOfM_updates_done(b3DynamicBvhBroadphase* c_this){
	return (unsigned int)(c_this->m_updates_done);
}

float bullet_b3DynamicBvhBroadphase_GetFieldOfM_updates_ratio(b3DynamicBvhBroadphase* c_this){
	return (float)(c_this->m_updates_ratio);
}

float bullet_b3DynamicBvhBroadphase_getVelocityPrediction(b3DynamicBvhBroadphase* c_this){
	b3Scalar c_out = c_this->getVelocityPrediction();
	float wrap_out = (c_out);
	return wrap_out;
}

void bullet_b3DynamicBvhBroadphase_optimize(b3DynamicBvhBroadphase* c_this){
	c_this->optimize();
}

void bullet_b3DynamicBvhBroadphase_performDeferredRemoval(b3DynamicBvhBroadphase* c_this,b3Dispatcher* dispatcher){
	b3Dispatcher * c_arg_dispatcher=(b3Dispatcher *)(void*)(dispatcher);
	c_this->performDeferredRemoval(c_arg_dispatcher);
}

void bullet_b3DynamicBvhBroadphase_setAabbForceUpdate(b3DynamicBvhBroadphase* c_this,b3BroadphaseProxy* absproxy,b3Vector3* aabbMin,b3Vector3* aabbMax,b3Dispatcher* tmp_arg3){
	b3BroadphaseProxy * c_arg_absproxy=(b3BroadphaseProxy *)(void*)(absproxy);
	b3Vector3 const& c_arg_aabbMin=(b3Vector3 const&)(*aabbMin);
	b3Vector3 const& c_arg_aabbMax=(b3Vector3 const&)(*aabbMax);
	b3Dispatcher * c_arg_tmp_arg3=(b3Dispatcher *)(void*)(tmp_arg3);
	c_this->setAabbForceUpdate(c_arg_absproxy,c_arg_aabbMin,c_arg_aabbMax,c_arg_tmp_arg3);
}

void bullet_b3DynamicBvhBroadphase_setVelocityPrediction(b3DynamicBvhBroadphase* c_this,float prediction){
	b3Scalar c_arg_prediction=prediction;
	c_this->setVelocityPrediction(c_arg_prediction);
}

b3DbvtProxy* bullet_Newb3DbvtProxy(){
	b3DbvtProxy* wrap_out = new b3DbvtProxy();
	return wrap_out;
}

b3DbvtProxy* bullet_Newb3DbvtProxy1(b3Vector3* aabbMin,b3Vector3* aabbMax,void* userPtr,int collisionFilterGroup,int collisionFilterMask){
	b3Vector3 const& c_arg_aabbMin=(b3Vector3 const&)(*aabbMin);
	b3Vector3 const& c_arg_aabbMax=(b3Vector3 const&)(*aabbMax);
	void * c_arg_userPtr=(void *)(void*)(userPtr);
	int c_arg_collisionFilterGroup=collisionFilterGroup;
	int c_arg_collisionFilterMask=collisionFilterMask;
	b3DbvtProxy* wrap_out = new b3DbvtProxy(c_arg_aabbMin,c_arg_aabbMax,c_arg_userPtr,c_arg_collisionFilterGroup,c_arg_collisionFilterMask);
	return wrap_out;
}

b3DbvtNode** bullet_b3DbvtProxy_GetFieldOfLeaf(b3DbvtProxy* c_this){
	return (b3DbvtNode**)(&c_this->leaf);
}

b3DbvtProxy*** bullet_b3DbvtProxy_GetFieldOfLinks(b3DbvtProxy* c_this){
	return (b3DbvtProxy***)(&c_this->links);
}

int bullet_b3DbvtProxy_GetFieldOfStage(b3DbvtProxy* c_this){
	return (int)(c_this->stage);
}

b3BroadphaseProxy* bullet_Newb3BroadphaseProxy(){
	b3BroadphaseProxy* wrap_out = new b3BroadphaseProxy();
	return wrap_out;
}

b3BroadphaseProxy* bullet_Newb3BroadphaseProxy1(b3Vector3* aabbMin,b3Vector3* aabbMax,void* userPtr,int collisionFilterGroup,int collisionFilterMask){
	b3Vector3 const& c_arg_aabbMin=(b3Vector3 const&)(*aabbMin);
	b3Vector3 const& c_arg_aabbMax=(b3Vector3 const&)(*aabbMax);
	void * c_arg_userPtr=(void *)(void*)(userPtr);
	int c_arg_collisionFilterGroup=collisionFilterGroup;
	int c_arg_collisionFilterMask=collisionFilterMask;
	b3BroadphaseProxy* wrap_out = new b3BroadphaseProxy(c_arg_aabbMin,c_arg_aabbMax,c_arg_userPtr,c_arg_collisionFilterGroup,c_arg_collisionFilterMask);
	return wrap_out;
}

b3Vector3* bullet_b3BroadphaseProxy_GetFieldOfM_aabbMax(b3BroadphaseProxy* c_this){
	return (b3Vector3*)(&c_this->m_aabbMax);
}

b3Vector3* bullet_b3BroadphaseProxy_GetFieldOfM_aabbMin(b3BroadphaseProxy* c_this){
	return (b3Vector3*)(&c_this->m_aabbMin);
}

void** bullet_b3BroadphaseProxy_GetFieldOfM_clientObject(b3BroadphaseProxy* c_this){
	return (void**)(&c_this->m_clientObject);
}

int bullet_b3BroadphaseProxy_GetFieldOfM_collisionFilterGroup(b3BroadphaseProxy* c_this){
	return (int)(c_this->m_collisionFilterGroup);
}

int bullet_b3BroadphaseProxy_GetFieldOfM_collisionFilterMask(b3BroadphaseProxy* c_this){
	return (int)(c_this->m_collisionFilterMask);
}

int bullet_b3BroadphaseProxy_GetFieldOfM_uniqueId(b3BroadphaseProxy* c_this){
	return (int)(c_this->m_uniqueId);
}

int bullet_b3BroadphaseProxy_getUid(b3BroadphaseProxy* c_this){
	int c_out = c_this->getUid();
	int wrap_out = (c_out);
	return wrap_out;
}

#ifdef __cplusplus
}
#endif
